function iv = gen_iv(min_profit, max_profit, profit_cutoff, fc_iv)

profit_cutoff = sort(profit_cutoff);
N_profit_iv = length(profit_cutoff);

profit_iv = [];
for k1 = 1 : N_profit_iv-1
    for k2 = k1+1 : N_profit_iv    
        profit_iv = [profit_iv ...
            ((profit_cutoff(k1)<min_profit) & (max_profit<profit_cutoff(k2)))];
    end
end

profit_iv = [profit_iv, min_profit>profit_cutoff, max_profit<profit_cutoff];

iv = [];
for n = 1 : size(profit_iv, 2)
    iv = [iv profit_iv(:, n) & fc_iv, profit_iv(:, n) & ~fc_iv];
end

